package com.ys.fmms.controller;

import com.ys.fmms.pojo.Video;
import com.ys.fmms.service.VideoService;
import com.ys.fmms.util.Result;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "处理视频获取")
@RestController
@RequestMapping("/fmms/videoController")
public class VideoController {

    @Autowired
    private VideoService videoService;

    @Operation(summary = "获取所有视频")
    @GetMapping("/acquireVideoUrl")
    public Result getVideoUrl(){
        List<Video> videoList = videoService.getVideoList();
        return Result.ok(videoList);
    }
}
